<template>
  <div>
    <p>Parent</p>
    <hr />
    <!-- <Child
      name="zhangsan"
      :age="30"
      :isShow="true"
      :address="address"
      :hobby="hobby"
    /> -->
    <Child
      name="张三"
      :age="30"
      :isShow="true"
      :address="address"
      :hobby="hobby"
      @myevent="getValue"
    />
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue'
import Child from './Child.vue'

const address = ref({
  province: '广东省',
  city: '深圳市'
})

const hobby = reactive(['打球', '旅游', '敲代码'])

const getValue = e => {
  console.log('---parent---', e)
}
</script>
